package com.example.test.advice.第一章_java开发中常用的方法和准则.建议15_break万万不能忘;

public class Client {

    public static void main(String[] args) {
        System.out.println("6 = "+toChineseNumberCase(6));
    }

    public static String toChineseNumberCase(int n){
        String chineseNumber = "";
        switch (n){
            case 0:chineseNumber = "零";
                break;
            case 1:chineseNumber = "壹";
                break;
            case 2:chineseNumber = "贰";
                break;
            case 3:chineseNumber = "叁";
                break;
            case 4:chineseNumber = "肆";
                break;
            case 5 :
                //break;
            case 6:chineseNumber = "陆";
                break;
            case 7:chineseNumber = "柒";
                break;
            case 8:chineseNumber = "捌";
                break;
            case 9:chineseNumber = "玖";
                break;
            case 10:chineseNumber = "拾";
                break;
            default:chineseNumber = "未匹配";
        }
        return chineseNumber;
    }
}
